<template>
  <div class="top-bar">
    <div class="top-bar-setting">
      <i class="el-icon-setting"
         @click="jump"
         style="color:#778899;font-size:1.5rem"></i>
    </div>
    <div class="top-bar-info">
      <div class="top-bar-info-left">
        <div class="top-fontup">张三</div>
        <div class="top-fontdown" @click="jumpmod">查看/编辑个人资料</div>
      </div>
      <div class="top-bar-info-right">
        <el-avatar :size="70"
                   :src="circleUrl"></el-avatar>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'topbar',
  data () {
    return {
      circleUrl: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
    }
  },
  methods: {
    jump () {
      this.$router.push({ path: '/Setting' })
    },
    jumpmod () {
      this.$router.push({ path: '/Modifyinform' })
    }
  }
}
</script>

<style scoped>
.top-fontup {
  font-size: 1.5rem;
  font-weight: bold;
  color: #4682b4;
}
.top-fontdown {
  font-size: 0.5rem;
  color: #778899;
}
.top-bar {
  width: 100%;
  height: 20%;
}
.top-bar-setting {
  font-size: 2rem;
  margin: 0px 0px 0px 20px;
}
.top-bar-info {
  display: inline-block;
  width: 100%;
}
.top-bar-info-left {
  float: left;
  margin-left: 25px;
}
.top-bar-info-right {
  float: right;
  margin-right: 25px;
}
</style>
